<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('WarTeam/index')}">战队列表</a></li>
			<li><a href="{:url('WarTeam/add')}">添加战队</a></li>
			<li class="active"><a>编辑战队</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('WarTeam/addPost')}">
			<div class="form-group">
				<label for="input-title" class="col-sm-2 control-label">战队名称<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-title" name="name" required value="{$data.name}">
				</div>
			</div>
			<div class="form-group">
				<label for="thumbnail" class="col-sm-2 control-label">战队图标<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input type="hidden" class="form-control" id="thumbnail" name="icon" required value="{$data.icon}">
					<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
						<img src="{:empty($data['icon'])?'__TMPL__/public/assets/images/default-thumbnail.png':$data['icon']}"
							 id="thumbnail-preview"
							 width="150" style="cursor: pointer"/>
					</a>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{:$data.id}">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>

</html>